package com.wssky.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private Boolean success;
    private String message;
    private Object data;

    public static  Result success(){
        return new Result(true,"操作成功",null);
    }

    public static  Result success(Object data){
        return new Result(true,"操作成功",data);
    }

    public static  Result error(String message){
        return new Result(false,message,null);
    }
}
